load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")

oncall("fboss_platform")

cpp_unittest(
    name = "config_validator_test",
    srcs = [
        "ConfigValidatorTest.cpp",
    ],
    deps = [
        "//fboss/platform/platform_manager:config_validator",
        "//folly/logging:logging",
        "//thrift/lib/cpp2/protocol:protocol",
    ],
)

cpp_unittest(
    name = "i2c_explorer_test",
    srcs = [
        "I2cExplorerTest.cpp",
    ],
    deps = [
        "//fboss/platform/helpers:mock_platform_fs_utils",
        "//fboss/platform/platform_manager:i2c_explorer",
    ],
)

cpp_unittest(
    name = "platform_explorer_test",
    srcs = [
        "PlatformExplorerTest.cpp",
    ],
    deps = [
        "//fb303:service_data",
        "//fboss/platform/helpers:platform_fs_utils",
        "//fboss/platform/platform_manager:platform_explorer",
        "//folly:file_util",
        "//folly/testing:test_util",
    ],
)

cpp_unittest(
    name = "utils_test",
    srcs = [
        "UtilsTest.cpp",
    ],
    deps = [
        "//fboss/platform/platform_manager:utils",
    ],
)

cpp_unittest(
    name = "data_store_test",
    srcs = [
        "DataStoreTest.cpp",
    ],
    deps = [
        "//fboss/platform/platform_manager:data_store",
    ],
)

cpp_unittest(
    name = "device_path_resolver_test",
    srcs = [
        "DevicePathResolverTest.cpp",
    ],
    deps = [
        "fbsource//third-party/googletest:gmock",
        "//fboss/platform/platform_manager:device_path_resolver",
    ],
)

cpp_unittest(
    name = "presence_checker_test",
    srcs = [
        "PresenceCheckerTest.cpp",
    ],
    deps = [
        "fbsource//third-party/googletest:gmock",
        "//fboss/platform/helpers:mock_platform_fs_utils",
        "//fboss/platform/platform_manager:presence_checker",
        "//fboss/platform/platform_manager:utils",
    ],
)

cpp_unittest(
    name = "exploration_summary_test",
    srcs = [
        "ExplorationSummaryTest.cpp",
    ],
    deps = [
        "fbsource//third-party/googletest:gmock",
        "//fb303:service_data",
        "//fboss/platform/platform_manager:platform_explorer",
    ],
)

cpp_unittest(
    name = "pkg_manager_test",
    srcs = [
        "PkgManagerTest.cpp",
        "SystemInterfaceTest.cpp",
    ],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "fbsource//third-party/googletest:gmock",
        "fbsource//third-party/range-v3:range-v3",
        "//fb303:service_data",
        "//fboss/platform/platform_manager:pkg_manager",
        "//thrift/lib/cpp2/protocol:protocol",
    ],
)
